<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <link rel="stylesheet" type="text/css" href="__CSS__/lib/normalize.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/mui-3.6.1.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/my_score.css" />
    <title>我的积分</title>
</head>

<body>
    <header>
    <div class="top-bar">
        <div class="return" onclick="location.href='{:U('/Wx/Index/index/r/my')}'"></div>
        <div class="top-middle">我的积分<span class="jfsm" onclick="location.href='/Wx/Score/explain'">积分说明</span></div>

    </div>

    <div class="score-info">
        <div class="score"><p>{$userScore|default=0}<br/><span >当前积分</span></p></div>
    </div>
    </header>

    <div class="rows" onclick="location.href='/Wx/Score/scoreShop'">
        <div class="img-warp"><img src="__IMG__/dscore.png" alt="积分" title="" /></div>
        <div class="exchange">积分兑换商品</div>
    </div>

    <div class="recent">最近30天积分记录</div>
    <ul class="list">
        <foreach name="list" item="v">
            <if condition="$v['IncDec'] == 0">
                <li class="list-li">
                    <div class="recent-cell mui-clearfix">
                         <if condition="$v['score'] eq 0">
                        <span class="record-left f-normal">微信支付兑换商品</span>
                        <else/>
                        <span class="record-left f-normal">兑换商品</span>
                        </if>
                        <span class="record-right">{$v['time']|date='Y-m-d',###}</span>
                    </div>
                    <div class="recent-cell mui-clearfix">
                        <span class="record-left">剩余积分：{$v['totalscore']}</span>
                        <if condition="$v['score'] eq 0">
                         <span class="record-right orange">无变动</span>
                        <else/>
                        <span class="record-right orange">-{$v['score']}</span>
                        </if>
                    </div>
                </li>
            <elseif condition="$v['IncDec'] == 1" />
                <li class="list-li">
                    <div class="recent-cell mui-clearfix">
                        <span class="record-left f-normal">获得积分</span>
                        <span class="record-right">{$v['time']|date='Y-m-d',###}</span>
                    </div>
                    <div class="recent-cell mui-clearfix">
                        <span class="record-left">剩余积分：{$v['totalscore']}</span>
                        <span class="record-right green">+{$v['score']}</span>
                    </div>
                </li>
            </if>
        </foreach>

    </ul>

</body>
</html>
